/* 暗色主题样式 */
@use "../base/variables" as *;
@use "./theme-base" as *;

[data-theme="dark"] {
  color-scheme: dark;
  
  @include theme-variables;
  @include dark-theme-colors;

  /* ===== 暗色主题特定样式 ===== */

  /* 页面背景渐变 - 更深的蓝灰色调 */
  body {
    background: linear-gradient(135deg, #1a1f2e 0%, #1e2139 50%, #252945 100%);
  }

  /* 卡片玻璃效果 */
  .glass-card {
    background: rgba(30, 33, 57, 0.85);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid rgba(60, 64, 67, 0.3);
    box-shadow: var(--shadow-lg);
  }

  /* 导航栏样式 */
  .navbar {
    background: rgba(30, 33, 57, 0.95);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--color-border-tertiary);
    box-shadow: var(--shadow-sm);
  }

  /* 侧边栏样式 */
  .sidebar {
    background: var(--color-bg-primary);
    border-right: 1px solid var(--color-border-tertiary);
  }

  /* 输入框聚焦效果 */
  .input-focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-lighter);
  }

  /* 按钮悬停效果 */
  .btn-hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }

  /* 表格斑马纹 */
  .table-striped tr:nth-child(even) {
    background-color: var(--color-bg-hover);
  }

  /* 代码块样式 */
  .code-block {
    background: var(--code-bg);
    border: 1px solid var(--color-border-secondary);
    border-radius: $border-radius-base;
  }

  /* 标签样式 */
  .tag-primary {
    background: var(--color-primary-lighter);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-dark);
  }

  .tag-success {
    background: var(--color-success-lighter);
    color: var(--color-success);
    border: 1px solid var(--color-success);
  }

  .tag-warning {
    background: var(--color-warning-lighter);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
  }

  .tag-danger {
    background: var(--color-danger-lighter);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
  }

  /* 加载动画 */
  .loading-spinner {
    border: 2px solid var(--color-border-secondary);
    border-top: 2px solid var(--color-primary);
  }

  /* 分割线 */
  .divider {
    border-color: var(--color-border-secondary);
  }

  /* 工具提示 */
  .tooltip {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-secondary);
  }

  /* 下拉菜单 */
  .dropdown-menu {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--shadow-lg);
  }

  /* 模态框 */
  .modal-backdrop {
    background: var(--color-bg-mask);
  }

  .modal-content {
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border-secondary);
  }

  /* 通知样式 */
  .notification {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--shadow-lg);
  }

  /* 进度条 */
  .progress-bar {
    background: var(--color-bg-secondary);

    .progress-fill {
      background: var(--gradient-primary);
    }
  }

  /* 开关组件 */
  .switch {
    background: var(--color-bg-secondary);

    &.active {
      background: var(--color-primary);
    }
  }

  /* 选项卡 */
  .tabs {
    border-bottom: 1px solid var(--color-border-secondary);

    .tab-item {
      color: var(--color-text-secondary);

      &.active {
        color: var(--color-primary);
        border-bottom-color: var(--color-primary);
      }

      &:hover {
        color: var(--color-text-primary);
      }
    }
  }

  /* 步骤条 */
  .steps {
    .step-item {
      .step-icon {
        background: var(--color-bg-secondary);
        color: var(--color-text-tertiary);
        border: 2px solid var(--color-border-secondary);

        &.active {
          background: var(--color-primary);
          color: var(--color-text-inverse);
          border-color: var(--color-primary);
        }

        &.completed {
          background: var(--color-success);
          color: var(--color-text-inverse);
          border-color: var(--color-success);
        }
      }

      .step-line {
        background: var(--color-border-secondary);

        &.completed {
          background: var(--color-success);
        }
      }
    }
  }

  /* Element Plus 组件暗色主题覆盖 */
  .el-card {
    background-color: var(--color-bg-primary);
    border-color: var(--color-border-secondary);
    color: var(--color-text-primary);
  }

  .el-input__wrapper {
    background-color: var(--color-bg-secondary);
    border-color: var(--color-border-primary);

    .el-input__inner {
      color: var(--color-text-primary);

      &::placeholder {
        color: var(--color-text-placeholder);
      }
    }
  }

  .el-button {
    &.el-button--default {
      background-color: var(--color-bg-secondary);
      border-color: var(--color-border-primary);
      color: var(--color-text-primary);

      &:hover {
        background-color: var(--color-bg-quaternary);
        border-color: var(--color-primary);
        color: var(--color-primary);
      }
    }
  }

  .el-table {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-radius: var(--border-radius-base);
    overflow: hidden;
    box-shadow: var(--shadow-base);

    .el-table__header-wrapper th {
      background-color: var(--color-bg-secondary);
      color: var(--color-text-primary);
      border-bottom-color: var(--color-border-secondary);
      font-weight: var(--font-weight-semibold);
    }

    .el-table__row {
      background-color: var(--color-bg-primary);
      transition: all var(--transition-fast);

      &:hover {
        background-color: var(--color-bg-hover);
        transform: translateY(-1px);
      }

      &:nth-child(even) {
        background-color: rgba(37, 41, 69, 0.3);
      }

      td {
        border-bottom-color: var(--color-border-tertiary);
        color: var(--color-text-primary);
      }
    }

    /* 表格操作按钮样式 */
    .el-button {
      &.el-button--primary {
        background: var(--gradient-primary);
        border: none;
        box-shadow: var(--shadow-sm);
        
        &:hover {
          transform: translateY(-1px);
          box-shadow: var(--shadow-md);
        }
      }

      &.el-button--success {
        background: var(--gradient-success);
        border: none;
      }

      &.el-button--danger {
        background: var(--gradient-danger);
        border: none;
      }
    }
  }

  .el-menu {
    background-color: var(--color-bg-primary);
    border-right-color: var(--color-border-secondary);

    .el-menu-item {
      color: var(--color-text-secondary);

      &:hover {
        background-color: var(--color-bg-hover);
        color: var(--color-text-primary);
      }

      &.is-active {
        background-color: var(--color-bg-active);
        color: var(--color-primary);
      }
    }
  }

  .el-dropdown-menu {
    background-color: var(--color-bg-primary);
    border-color: var(--color-border-secondary);

    .el-dropdown-menu__item {
      color: var(--color-text-primary);

      &:hover {
        background-color: var(--color-bg-hover);
        color: var(--color-primary);
      }
    }
  }

  .el-dialog {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);

    .el-dialog__header {
      border-bottom-color: var(--color-border-secondary);

      .el-dialog__title {
        color: var(--color-text-primary);
      }
    }

    .el-dialog__body {
      color: var(--color-text-primary);
    }
  }

  .el-message {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    color: var(--color-text-primary);
  }

  .el-notification {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    color: var(--color-text-primary);
  }

  /* ===== 图表和数据展示样式 ===== */
  
  /* 统计卡片 */
  .stats-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
    transition: all var(--transition-base);

    &:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
      border-color: var(--color-primary);
    }

    .stats-number {
      color: var(--color-text-primary);
      font-weight: var(--font-weight-bold);
    }

    .stats-label {
      color: var(--color-text-secondary);
    }

    .stats-icon {
      color: var(--color-primary);
    }
  }

  /* 数据表格容器 */
  .data-table-container {
    background: var(--color-bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
    border: 1px solid var(--color-border-secondary);
    overflow: hidden;

    .table-header {
      background: var(--color-bg-secondary);
      padding: var(--spacing-md) var(--spacing-lg);
      border-bottom: 1px solid var(--color-border-secondary);

      .table-title {
        color: var(--color-text-primary);
        font-weight: var(--font-weight-semibold);
      }

      .table-actions {
        .el-button {
          background: var(--color-bg-quaternary);
          border-color: var(--color-border-primary);
          color: var(--color-text-primary);

          &:hover {
            background: var(--color-primary);
            border-color: var(--color-primary);
            color: var(--color-text-inverse);
          }
        }
      }
    }
  }

  /* 状态标签 */
  .status-tag {
    border-radius: var(--border-radius-full);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border: 1px solid;

    &.status-active {
      background: var(--color-success-lighter);
      color: var(--color-success);
      border-color: var(--color-success);
    }

    &.status-inactive {
      background: var(--color-danger-lighter);
      color: var(--color-danger);
      border-color: var(--color-danger);
    }

    &.status-pending {
      background: var(--color-warning-lighter);
      color: var(--color-warning);
      border-color: var(--color-warning);
    }
  }

  /* 图表容器 */
  .chart-container {
    background: var(--color-bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-base);
    border: 1px solid var(--color-border-secondary);
    padding: var(--spacing-lg);

    .chart-title {
      color: var(--color-text-primary);
      font-weight: var(--font-weight-semibold);
      margin-bottom: var(--spacing-md);
    }
  }

  .el-pagination {
    .el-pagination__total {
      color: var(--color-text-secondary);
    }

    .el-pager li {
      background-color: var(--color-bg-secondary);
      color: var(--color-text-primary);
      border: 1px solid var(--color-border-secondary);

      &.is-active {
        background-color: var(--color-primary);
        color: var(--color-text-inverse);
      }

      &:hover:not(.is-active) {
        background-color: var(--color-bg-hover);
        color: var(--color-primary);
      }
    }

    .btn-prev,
    .btn-next {
      background-color: var(--color-bg-secondary);
      color: var(--color-text-primary);
      border: 1px solid var(--color-border-secondary);

      &:hover {
        background-color: var(--color-bg-hover);
        color: var(--color-primary);
      }
    }
  }

  /* ===== 全覆盖样式 - 确保所有元素都应用暗色主题 ===== */
  
  /* 页面容器和内容区域 */
  .page-container,
  .admin-container,
  .content-area,
  .main-content {
    background: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
  }

  .page-content,
  .admin-content,
  .content-wrapper {
    background: var(--color-bg-primary) !important;
    border: 1px solid var(--color-border-secondary) !important;
    box-shadow: var(--shadow-base) !important;
  }

  /* 所有卡片和面板 */
  .el-card,
  .card,
  .panel,
  .widget,
  .stat-card,
  .header-stats .stat-card {
    background: var(--color-bg-primary) !important;
    border-color: var(--color-border-secondary) !important;
    color: var(--color-text-primary) !important;
    box-shadow: var(--shadow-base) !important;

    .el-card__header {
      background: var(--color-bg-secondary) !important;
      border-bottom-color: var(--color-border-secondary) !important;
      color: var(--color-text-primary) !important;
    }

    .el-card__body {
      background: var(--color-bg-primary) !important;
      color: var(--color-text-primary) !important;
    }
  }

  /* 所有输入框和表单元素 */
  .el-input,
  .el-textarea,
  .el-select,
  .el-date-picker,
  .el-time-picker,
  .el-cascader,
  .el-autocomplete {
    .el-input__wrapper,
    .el-textarea__inner,
    .el-select__wrapper {
      background-color: var(--color-bg-secondary) !important;
      border-color: var(--color-border-primary) !important;
      color: var(--color-text-primary) !important;
      box-shadow: none !important;

      &:hover {
        border-color: var(--color-primary) !important;
      }

      &.is-focus {
        border-color: var(--color-primary) !important;
        box-shadow: 0 0 0 2px var(--color-primary-lighter) !important;
      }
    }

    .el-input__inner,
    .el-textarea__inner {
      background-color: transparent !important;
      color: var(--color-text-primary) !important;

      &::placeholder {
        color: var(--color-text-placeholder) !important;
      }
    }
  }

  /* 所有按钮 */
  .el-button {
    &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info) {
      background-color: var(--color-bg-secondary) !important;
      border-color: var(--color-border-primary) !important;
      color: var(--color-text-primary) !important;

      &:hover {
        background-color: var(--color-bg-quaternary) !important;
        border-color: var(--color-primary) !important;
        color: var(--color-primary) !important;
      }
    }

    &.el-button--primary {
      background: var(--gradient-primary) !important;
      border: none !important;
      color: var(--color-text-inverse) !important;
    }

    &.el-button--success {
      background: var(--gradient-success) !important;
      border: none !important;
      color: var(--color-text-inverse) !important;
    }

    &.el-button--warning {
      background: var(--gradient-warning) !important;
      border: none !important;
      color: var(--color-text-inverse) !important;
    }

    &.el-button--danger {
      background: var(--gradient-danger) !important;
      border: none !important;
      color: var(--color-text-inverse) !important;
    }

    &.el-button--text {
      color: var(--color-primary) !important;
      background: transparent !important;

      &:hover {
        background: var(--color-primary-lighter) !important;
      }
    }
  }

  /* 所有下拉菜单和弹出层 */
  .el-dropdown-menu,
  .el-select-dropdown,
  .el-cascader-panel,
  .el-date-picker__editor,
  .el-picker-panel,
  .el-popper {
    background: var(--color-bg-primary) !important;
    border-color: var(--color-border-secondary) !important;
    box-shadow: var(--shadow-lg) !important;

    .el-dropdown-menu__item,
    .el-select-dropdown__item,
    .el-cascader-node {
      color: var(--color-text-primary) !important;

      &:hover {
        background-color: var(--color-bg-hover) !important;
        color: var(--color-primary) !important;
      }

      &.is-selected {
        background-color: var(--color-bg-active) !important;
        color: var(--color-primary) !important;
      }
    }
  }

  /* 所有表格 */
  .el-table,
  table {
    background-color: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;

    th,
    .el-table__header-wrapper th,
    .el-table__cell {
      background-color: var(--color-bg-secondary) !important;
      color: var(--color-text-primary) !important;
      border-bottom-color: var(--color-border-secondary) !important;
    }

    td,
    .el-table__row td {
      background-color: var(--color-bg-primary) !important;
      color: var(--color-text-primary) !important;
      border-bottom-color: var(--color-border-tertiary) !important;
    }

    .el-table__row {
      &:hover td {
        background-color: var(--color-bg-hover) !important;
      }

      &:nth-child(even) td {
        background-color: rgba(37, 41, 69, 0.3) !important;
      }
    }
  }

  /* 所有对话框和模态框 */
  .el-dialog,
  .el-drawer,
  .modal {
    background-color: var(--color-bg-primary) !important;
    border: 1px solid var(--color-border-secondary) !important;
    box-shadow: var(--shadow-xl) !important;

    .el-dialog__header,
    .el-drawer__header,
    .modal-header {
      background-color: var(--color-bg-secondary) !important;
      border-bottom-color: var(--color-border-secondary) !important;
      color: var(--color-text-primary) !important;
    }

    .el-dialog__body,
    .el-drawer__body,
    .modal-body {
      background-color: var(--color-bg-primary) !important;
      color: var(--color-text-primary) !important;
    }

    .el-dialog__footer,
    .modal-footer {
      background-color: var(--color-bg-secondary) !important;
      border-top-color: var(--color-border-secondary) !important;
    }
  }

  /* 所有消息和通知 */
  .el-message,
  .el-notification,
  .el-alert {
    background-color: var(--color-bg-primary) !important;
    border: 1px solid var(--color-border-secondary) !important;
    color: var(--color-text-primary) !important;
    box-shadow: var(--shadow-lg) !important;
  }

  /* 所有加载和骨架屏 */
  .el-loading-mask {
    background-color: var(--color-bg-mask) !important;
  }

  .el-skeleton__item {
    background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-bg-quaternary) 37%, var(--color-bg-secondary) 63%) !important;
  }

  /* 所有分页器 */
  .el-pagination {
    background: transparent !important;

    .el-pagination__total,
    .el-pagination__jump {
      color: var(--color-text-secondary) !important;
    }

    .el-pager li,
    .btn-prev,
    .btn-next,
    .el-pagination__sizes .el-select .el-input__wrapper {
      background-color: var(--color-bg-secondary) !important;
      border-color: var(--color-border-secondary) !important;
      color: var(--color-text-primary) !important;

      &:hover {
        background-color: var(--color-bg-hover) !important;
        color: var(--color-primary) !important;
      }

      &.is-active,
      &.active {
        background-color: var(--color-primary) !important;
        color: var(--color-text-inverse) !important;
        border-color: var(--color-primary) !important;
      }
    }
  }

  /* 所有标签和徽章 */
  .el-tag,
  .el-badge,
  .tag,
  .badge {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-primary) !important;
    color: var(--color-text-primary) !important;

    &.el-tag--success,
    &.success {
      background-color: var(--color-success-lighter) !important;
      color: var(--color-success) !important;
      border-color: var(--color-success) !important;
    }

    &.el-tag--warning,
    &.warning {
      background-color: var(--color-warning-lighter) !important;
      color: var(--color-warning) !important;
      border-color: var(--color-warning) !important;
    }

    &.el-tag--danger,
    &.danger {
      background-color: var(--color-danger-lighter) !important;
      color: var(--color-danger) !important;
      border-color: var(--color-danger) !important;
    }

    &.el-tag--info,
    &.info {
      background-color: var(--color-info-lighter) !important;
      color: var(--color-info) !important;
      border-color: var(--color-info) !important;
    }
  }

  /* 所有文本和标题 */
  h1, h2, h3, h4, h5, h6,
  .title, .subtitle,
  .page-title, .page-subtitle,
  .section-title,
  p, span, div, label {
    color: var(--color-text-primary) !important;
  }

  .text-secondary,
  .description,
  .hint,
  .note {
    color: var(--color-text-secondary) !important;
  }

  .text-muted,
  .placeholder {
    color: var(--color-text-tertiary) !important;
  }

  /* 所有链接 */
  a, .link {
    color: var(--color-primary) !important;

    &:hover {
      color: var(--color-primary-dark) !important;
    }
  }

  /* 所有分割线 */
  .el-divider,
  hr,
  .divider {
    border-color: var(--color-border-secondary) !important;
  }

  /* 所有滚动条 */
  ::-webkit-scrollbar {
    background: var(--color-bg-secondary) !important;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--color-border-primary) !important;

    &:hover {
      background: var(--color-text-quaternary) !important;
    }
  }

  ::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary) !important;
  }

  /* ===== 强制覆盖所有面板和容器 ===== */
  .panel,
  .section,
  .container,
  .wrapper,
  .box,
  .widget {
    background: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-secondary) !important;
  }

  /* 强制覆盖所有白色背景 */
  [style*="background: white"],
  [style*="background: #fff"],
  [style*="background: #ffffff"],
  [style*="background-color: white"],
  [style*="background-color: #fff"],
  [style*="background-color: #ffffff"] {
    background: var(--color-bg-primary) !important;
    background-color: var(--color-bg-primary) !important;
  }

  /* 强制覆盖所有黑色文字 */
  [style*="color: black"],
  [style*="color: #000"],
  [style*="color: #000000"] {
    color: var(--color-text-primary) !important;
  }

  /* ===== Dashboard 特定样式强化 ===== */
  .dashboard-container,
  .dashboard-page {
    background: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
  }

  .welcome-section,
  .quick-actions-section,
  .stats-section,
  .recent-section {
    .panel,
    .section-content {
      background: var(--color-bg-primary) !important;
      border-color: var(--color-border-secondary) !important;
      color: var(--color-text-primary) !important;
    }
  }

  .action-card,
  .stat-card,
  .activity-item,
  .recent-item {
    background: var(--color-bg-primary) !important;
    border-color: var(--color-border-secondary) !important;
    color: var(--color-text-primary) !important;

    &:hover {
      background: var(--color-bg-hover) !important;
      border-color: var(--color-primary) !important;
    }
  }

  /* ===== 题目集页面强化 ===== */
  .problem-sets-container,
  .problem-sets-header,
  .filter-toolbar,
  .search-bar {
    background: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-secondary) !important;
  }

  .problem-set-card,
  .problem-card {
    background: var(--color-bg-primary) !important;
    border-color: var(--color-border-secondary) !important;
    color: var(--color-text-primary) !important;
  }

  /* ===== 个人中心强化 ===== */
  .profile-container,
  .profile-content,
  .profile-section {
    background: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-secondary) !important;
  }

  .profile-card,
  .info-card,
  .settings-card {
    background: var(--color-bg-primary) !important;
    border-color: var(--color-border-secondary) !important;
    color: var(--color-text-primary) !important;
  }

  /* ===== Form 表单强化 ===== */
  .el-form,
  form {
    background: transparent !important;
    color: var(--color-text-primary) !important;

    .el-form-item {
      .el-form-item__label {
        color: var(--color-text-primary) !important;
      }

      .el-form-item__content {
        color: var(--color-text-primary) !important;
      }

      .el-form-item__error {
        color: var(--color-danger) !important;
      }
    }
  }

  /* ===== 搜索框强化 ===== */
  .search-wrapper,
  .search-container,
  .search-box {
    background: var(--color-bg-secondary) !important;
    border-color: var(--color-border-primary) !important;

    input {
      background: transparent !important;
      color: var(--color-text-primary) !important;

      &::placeholder {
        color: var(--color-text-placeholder) !important;
      }
    }
  }

  /* ===== 空状态强化 ===== */
  .el-empty,
  .empty-state,
  .no-data {
    background: var(--color-bg-primary) !important;
    color: var(--color-text-secondary) !important;

    .el-empty__description,
    .empty-text {
      color: var(--color-text-secondary) !important;
    }
  }

  /* ===== 加载状态强化 ===== */
  .el-loading-parent--relative {
    .el-loading-mask {
      background-color: var(--color-bg-mask) !important;
    }

    .el-loading-spinner {
      .el-loading-text {
        color: var(--color-text-primary) !important;
      }
    }
  }

  /* ===== Skeleton 骨架屏强化 ===== */
  .el-skeleton,
  .skeleton {
    background: var(--color-bg-primary) !important;

    .el-skeleton__item {
      background: var(--color-bg-secondary) !important;
    }
  }

  /* ===== Badge 徽章强化 ===== */
  .el-badge__content {
    background-color: var(--color-danger) !important;
    border-color: var(--color-bg-primary) !important;
    color: var(--color-text-inverse) !important;
  }

  /* ===== Breadcrumb 面包屑强化 ===== */
  .el-breadcrumb,
  .breadcrumb {
    .el-breadcrumb__item {
      .el-breadcrumb__inner {
        color: var(--color-text-secondary) !important;

        &:hover {
          color: var(--color-primary) !important;
        }
      }

      &:last-child .el-breadcrumb__inner {
        color: var(--color-text-primary) !important;
      }
    }

    .el-breadcrumb__separator {
      color: var(--color-text-quaternary) !important;
    }
  }

  /* ===== Steps 步骤条强化 ===== */
  .el-steps {
    .el-step__head {
      color: var(--color-text-secondary) !important;
      border-color: var(--color-border-secondary) !important;

      &.is-finish {
        color: var(--color-primary) !important;
        border-color: var(--color-primary) !important;
      }

      &.is-process {
        color: var(--color-primary) !important;
        border-color: var(--color-primary) !important;
      }
    }

    .el-step__title {
      color: var(--color-text-primary) !important;

      &.is-finish {
        color: var(--color-primary) !important;
      }
    }

    .el-step__description {
      color: var(--color-text-secondary) !important;
    }

    .el-step__line {
      background-color: var(--color-border-secondary) !important;

      &.is-finish {
        background-color: var(--color-primary) !important;
      }
    }
  }

  /* ===== Collapse 折叠面板强化 ===== */
  .el-collapse {
    border-color: var(--color-border-secondary) !important;

    .el-collapse-item {
      background-color: var(--color-bg-primary) !important;

      .el-collapse-item__header {
        background-color: var(--color-bg-secondary) !important;
        color: var(--color-text-primary) !important;
        border-bottom-color: var(--color-border-secondary) !important;

        &:hover {
          background-color: var(--color-bg-hover) !important;
        }
      }

      .el-collapse-item__wrap {
        background-color: var(--color-bg-primary) !important;
        border-bottom-color: var(--color-border-secondary) !important;

        .el-collapse-item__content {
          color: var(--color-text-primary) !important;
        }
      }
    }
  }

  /* ===== Tabs 标签页强化 ===== */
  .el-tabs {
    .el-tabs__header {
      background-color: transparent !important;
      border-bottom-color: var(--color-border-secondary) !important;

      .el-tabs__nav {
        background-color: transparent !important;
      }

      .el-tabs__item {
        color: var(--color-text-secondary) !important;

        &:hover {
          color: var(--color-text-primary) !important;
        }

        &.is-active {
          color: var(--color-primary) !important;
        }
      }

      .el-tabs__active-bar {
        background-color: var(--color-primary) !important;
      }
    }

    .el-tabs__content {
      color: var(--color-text-primary) !important;
    }
  }

  /* ===== 其他零碎元素 ===== */
  .el-backtop {
    background-color: var(--color-bg-primary) !important;
    border: 1px solid var(--color-border-secondary) !important;
    color: var(--color-primary) !important;
    box-shadow: var(--shadow-lg) !important;

    &:hover {
      background-color: var(--color-primary) !important;
      color: var(--color-text-inverse) !important;
    }
  }

  .el-page-header {
    background-color: var(--color-bg-primary) !important;
    border-bottom-color: var(--color-border-secondary) !important;

    .el-page-header__title,
    .el-page-header__content {
      color: var(--color-text-primary) !important;
    }
  }

  .el-result {
    background-color: var(--color-bg-primary) !important;

    .el-result__title,
    .el-result__subtitle {
      color: var(--color-text-primary) !important;
    }

    .el-result__extra {
      color: var(--color-text-secondary) !important;
    }
  }

  /* ===== 最终保底覆盖 ===== */
  * {
    &:not(.el-button--primary):not(.el-button--success):not(.el-button--warning):not(.el-button--danger):not(.el-button--info) {
      scrollbar-color: var(--color-border-primary) var(--color-bg-secondary);
    }
  }
}
